package es

import (
	elasticsearch7 "github.com/elastic/go-elasticsearch/v7"
	"goods/internal/svc"
)

var esClient *elasticsearch7.Client

func InitEs(svcCtx *svc.ServiceContext) error {
	var err error
	esClient, err = elasticsearch7.NewClient(elasticsearch7.Config{
		Addresses: []string{svcCtx.Config.Es.Address},
	})
	return err
}
